﻿using System;
using System.Collections.Generic;

namespace Hx.Domain.Repositories
{
    public interface IRepository<TAggregateRoot>
        where TAggregateRoot : class, IAggregateRoot
    {
        IRepositoryContext Context { get; }
        void Add(TAggregateRoot aggregateRoot);
        TAggregateRoot GetByKey(Guid key);
        IEnumerable<TAggregateRoot> All();
        void Remove(TAggregateRoot aggregateRoot);
        void Update(TAggregateRoot aggregateRoot);
    }
}
